package com.zmn.plat.services.impl.channel;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.common.dto.StatusDTO;
import com.zmn.plat.model.entity.channel.ChannelInterface;
import com.zmn.plat.model.entity.channel.ChannelInterfaceQuery;
import com.zmn.plat.persistence.interfaces.channel.ChannelInterfaceDAO;
import com.zmn.plat.services.interfaces.channel.ChannelInterfaceService;

/**
 * 描述:渠道接口ServiceImpl
 *
 * @author tanghongjun
 * @since: 2018/10/16 17:56
 */
@Service
public class ChannelInterfaceServiceImpl implements ChannelInterfaceService {

    @Resource
    private ChannelInterfaceDAO channelInterfaceDAO;

    @Override
    public ChannelInterface findByKey(Integer interfaceId) {
        return channelInterfaceDAO.findByKey(interfaceId);
    }

    @Override
    public Integer findKeyForMax() {
        return channelInterfaceDAO.findKeyForMax();
    }

    @Override
    public List<ChannelInterface> listPageByQuery(ChannelInterfaceQuery query) {
        return channelInterfaceDAO.listPageByQuery(query);
    }

    @Override
    public List<ChannelInterface> listByQuery(ChannelInterfaceQuery query) {
        return channelInterfaceDAO.listByQuery(query);
    }

    @Override
    public List<ChannelInterface> listAll() {
        return channelInterfaceDAO.listAll();
    }

    @Override
    public Integer countByQuery(ChannelInterfaceQuery query) {
        return channelInterfaceDAO.countByQuery(query);
    }

    @Override
    public Integer updateByKey(ChannelInterface channelInterface) {
        return channelInterfaceDAO.updateByKey(channelInterface);
    }

    @Override
    public Integer updateStatus(ChannelInterface channelInterface) {
        return channelInterfaceDAO.updateStatus(channelInterface);
    }

    @Override
    public Integer updateStatusBatch(StatusDTO dto) {
        return channelInterfaceDAO.updateStatusBatch(dto);
    }

    @Override
    public Integer insert(ChannelInterface channelInterface) {
        return channelInterfaceDAO.insert(channelInterface);
    }

    @Override
    public Integer deleteByKey(Integer interfaceId) {
        return channelInterfaceDAO.deleteByKey(interfaceId);
    }
}